<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const d = new Date(2012, 1, 19, 3, 12);
      //
      function getLocalDay(date) {
        const weekObj = ["7", "MO", "TU", "WE", "TH", "FR", "SA"];
        const day = date.getDay(); //0-6
        return weekObj[day];
      }
      console.log(getLocalDay(d));
    </script>
  </body>
</html>
